<?php
include 'Model.class.php';

class groupModel extends Model
{
	private $group='frdgroup';
	public function getGrps($uid)
	{
		$sql="select * from $this->group where ownid=$uid";
		return $this->db->getAll($sql);
		
	}
	//添加一个分组
	public function add($uid,$gname)
	{
		if($this->db->insert($this->group,array('ownid'=>$uid,'gname'=>$gname)))
		{
			return $this->db->insert_id();
		}
		else
		{
			return false;
		}
	}
}